lib/commit: Try checksum+hardlink for untrusted local same-uid repos
authorColin Walters <walters@verbum.org>
Tue, 4 Dec 2018 14:37:20 +0000 (09:37 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 4 Dec 2018 20:38:41 +0000 (20:38 +0000)
commitdc2a7de2170aa35c33c9e767532f94be7f6f32c0
tree372ddc98f3764e8f957bcdd947dd0231039a68c0
parentc515c69d484f37be7d407dbcdaae10f6810b266b
lib/commit: Try checksum+hardlink for untrusted local same-uid repos

This mainly helps flatpak for enabling a hardlink-able local pull
during deploy in the --system case.  We assume the files are immutable
when owned by the same uid.

See https://github.com/ostreedev/ostree/issues/1723
and https://github.com/flatpak/flatpak/pull/2342

Closes: #1776
Approved by: uajain
src/libostree/ostree-repo-commit.c
tests/basic-test.sh
tests/test-basic-user-only.sh
tests/test-basic-user.sh
tests/test-basic.sh
tests/test-pull-untrusted.sh